package bean;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * Post entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class Post implements java.io.Serializable {

	// Fields

	private Integer PId;
	private User user;
	private Igroup igroup;
	private String postTitle;
	private String postContent;
	private Date createdAt;
	private Set postComments = new HashSet(0);

	// Constructors

	/** default constructor */
	public Post() {
	}

	/** minimal constructor */
	public Post(Integer PId, User user, Igroup igroup, String postTitle,
			String postContent, Date createdAt) {
		this.PId = PId;
		this.user = user;
		this.igroup = igroup;
		this.postTitle = postTitle;
		this.postContent = postContent;
		this.createdAt = createdAt;
	}

	/** full constructor */
	public Post(Integer PId, User user, Igroup igroup, String postTitle,
			String postContent, Date createdAt, Set postComments) {
		this.PId = PId;
		this.user = user;
		this.igroup = igroup;
		this.postTitle = postTitle;
		this.postContent = postContent;
		this.createdAt = createdAt;
		this.postComments = postComments;
	}

	// Property accessors

	public Integer getPId() {
		return this.PId;
	}

	public void setPId(Integer PId) {
		this.PId = PId;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Igroup getIgroup() {
		return this.igroup;
	}

	public void setIgroup(Igroup igroup) {
		this.igroup = igroup;
	}

	public String getPostTitle() {
		return this.postTitle;
	}

	public void setPostTitle(String postTitle) {
		this.postTitle = postTitle;
	}

	public String getPostContent() {
		return this.postContent;
	}

	public void setPostContent(String postContent) {
		this.postContent = postContent;
	}

	public Date getCreatedAt() {
		return this.createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public Set getPostComments() {
		return this.postComments;
	}

	public void setPostComments(Set postComments) {
		this.postComments = postComments;
	}

}